package view

var detail = `{{define "detail"}}
{{template "header" .}}

		<div class="col-md-12" role="main"><h3>用户详情</h3>
        <hr>       

        	<div class="table-responsive"><table class="table table-bordered table-striped">
	           				
				<tbody>

				<tr>				
				<td>IP地址</td>			
				<td>{{.sess.GetIPAddress}}&nbsp;</td>				
				</tr>

				<tr>				
				<td>地区</td>			
				<td>{{.sess.GetLocation}}&nbsp;</td>				
				</tr>

				<tr>				
				<td>注册码</td>			
				<td>{{.sess.GetUserCode}}&nbsp;</td>				
				</tr>					

				<tr>				
				<td>有效期</td>			
				<td>{{.sess.ExpirationDateString}}&nbsp;</td>				
				</tr>

				<tr>				
				<td>限速</td>			
				<td>{{.sess.GetSpeed}} KB/S&nbsp;</td>				
				</tr>

				<tr>				
				<td>登录时间</td>			
				<td>{{.sess.LoginDateString}}&nbsp;</td>				
				</tr>		

				<tr>				
				<td>最后更新</td>			
				<td>{{.sess.ActiveDateString}}&nbsp;</td>				
				</tr>	

				<tr>				
				<td>下载次数</td>			
				<td>{{.sess.GetDownloadCount}}&nbsp;</td>				
				</tr>	

				<tr>				
				<td>已接收</td>			
				<td>{{transfer .sess.GetTotalRecvBytes}}&nbsp;</td>				
				</tr>

				<tr>				
				<td>已发送</td>			
				<td>{{transfer .sess.GetTotalSentBytes}}&nbsp;</td>				
				</tr>

				<tr>				
				<td>当前速率</td>			
				<td>{{transfer .sess.GetLastSpeed}}/S&nbsp;</td>				
				</tr>

				</tbody>
			</table></div>			
		</div>


		{{if .downloadcount}}
        <div class="col-md-12" role="main"><h3>下载歌曲列表</h3>
        <hr>
        	<div class="table-responsive"><table class="table table-bordered table-striped">
	            <thead>
					<tr>													
					<th>歌曲编号</th>
					<th>歌曲名</th>
					<th>时间</th>						
					</tr>
				</thead>

				<tbody>

				{{range .sess.GetDownloadRecord}}
				<tr>				
				<td>{{.Number}}&nbsp;</td>	
				<td>{{getsongname .Number}}&nbsp;</td>		
				<td>{{formattime .Date}}&nbsp;</td>				
				</tr>
				{{end}}

				</tbody>
			</table></div>			
		</div>
	    {{end}}

	    <p>					
		<a href="/ktv/online" class="btn btn-default pull-right" role="button">返回列表</a>
		</p>

{{template "footer" .}}
{{end}}`
